package com.zh.web.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

@Getter
@ApiModel("爬取类型枚举")
public enum CrawlType {

    ARTICLE(100, "article"),
    VIDEO(101, "video");
    @EnumValue
    @JsonValue
    @ApiModelProperty(value = "类型编号", example = "100 101 102")
    private final Integer code;
    @ApiModelProperty(value = "类型描述", example = "article 、video")
    private final String desc;

    CrawlType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
